package com.xing.service.impl;

import com.xing.dao.BookDao;
import com.xing.dao.impl.BookDaoImpl;
import com.xing.domain.Book;
import com.xing.service.BookService;

import java.util.List;

/*
 * 静，谦虚谨慎，心胸宽广容纳所有好的坏的、先苦后甜
 * day40web1
 * 2021/4/30 15:00
 */
public class BookServiceImpl implements BookService {
    private BookDao bookDao=new BookDaoImpl();

    @Override
    public List<Book> findAll() {
        return bookDao.selectAll();
    }

    @Override
    public void remove(int bookId) {
        bookDao.delete(bookId);
    }

    @Override
    public Book findById(int boolId) {
        return bookDao.selectById(boolId);
    }

    @Override
    public void modify(Book book) {
        bookDao.update(book);
    }

    @Override
    public void add(Book book) {
        bookDao.insert(book);
    }


}
